\section{DBUtility.DbHelperSQL类参考}
\label{class_d_b_utility_1_1_db_helper_s_q_l}\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}


数据访问抽象基础类  


\subsection*{静态公有成员}
\begin{DoxyCompactItemize}
\item 
static bool {\bf ColumnExists} (string tableName, string columnName)
\begin{DoxyCompactList}\small\item\em 判断是否存在某表的某个字段 \item\end{DoxyCompactList}\item 
static int {\bfseries GetMaxID} (string FieldName, string TableName)\label{class_d_b_utility_1_1_db_helper_s_q_l_aeda9bfff3209278d1754517e507cbee8}

\item 
static bool {\bfseries Exists} (string strSql)\label{class_d_b_utility_1_1_db_helper_s_q_l_aeb46e514b2fdf0f4e43a70240638b148}

\item 
static bool {\bf TabExists} (string TableName)
\begin{DoxyCompactList}\small\item\em 表是否存在 \item\end{DoxyCompactList}\item 
static bool {\bfseries Exists} (string strSql, params SqlParameter[$\,$] cmdParms)\label{class_d_b_utility_1_1_db_helper_s_q_l_ae0ab73e74afcd17493a1cc679ea690d1}

\item 
static int {\bf ExecuteSql} (string SQLString)
\begin{DoxyCompactList}\small\item\em 执行SQL语句，返回影响的记录数 \item\end{DoxyCompactList}\item 
static int {\bfseries ExecuteSqlByTime} (string SQLString, int Times)\label{class_d_b_utility_1_1_db_helper_s_q_l_aa5b997789086410fa2d0f575d3e3a16e}

\item 
static int {\bf ExecuteSqlTran} (List$<$ String $>$ SQLStringList)
\begin{DoxyCompactList}\small\item\em 执行多条SQL语句，实现数据库事务。 \item\end{DoxyCompactList}\item 
static int {\bf ExecuteSql} (string SQLString, string content)
\begin{DoxyCompactList}\small\item\em 执行带一个存储过程参数的的SQL语句。 \item\end{DoxyCompactList}\item 
static object {\bf ExecuteSqlGet} (string SQLString, string content)
\begin{DoxyCompactList}\small\item\em 执行带一个存储过程参数的的SQL语句。 \item\end{DoxyCompactList}\item 
static int {\bf ExecuteSqlInsertImg} (string strSQL, byte[$\,$] fs)
\begin{DoxyCompactList}\small\item\em 向数据库里插入图像格式的字段(和上面情况类似的另一种实例) \item\end{DoxyCompactList}\item 
static object {\bf GetSingle} (string SQLString)
\begin{DoxyCompactList}\small\item\em 执行一条计算查询结果语句，返回查询结果（object）。 \item\end{DoxyCompactList}\item 
static object {\bfseries GetSingle} (string SQLString, int Times)\label{class_d_b_utility_1_1_db_helper_s_q_l_add9588f8bb4b9e269f46cada65005583}

\item 
static SqlDataReader {\bf ExecuteReader} (string strSQL)
\begin{DoxyCompactList}\small\item\em 执行查询语句，返回SqlDataReader ( 注意：调用该方法后，一定要对SqlDataReader进行Close ) \item\end{DoxyCompactList}\item 
static DataSet {\bf Query} (string SQLString)
\begin{DoxyCompactList}\small\item\em 执行查询语句，返回DataSet \item\end{DoxyCompactList}\item 
static DataSet {\bfseries Query} (string SQLString, int Times)\label{class_d_b_utility_1_1_db_helper_s_q_l_ab70d956f5d5101bcf4ba12ce3d005d44}

\item 
static int {\bf ExecuteSql} (string SQLString, params SqlParameter[$\,$] cmdParms)
\begin{DoxyCompactList}\small\item\em 执行SQL语句，返回影响的记录数 \item\end{DoxyCompactList}\item 
static void {\bf ExecuteSqlTran} (Hashtable SQLStringList)
\begin{DoxyCompactList}\small\item\em 执行多条SQL语句，实现数据库事务。 \item\end{DoxyCompactList}\item 
static int {\bf ExecuteSqlTran} (System.Collections.Generic.List$<$ {\bf CommandInfo} $>$ cmdList)
\begin{DoxyCompactList}\small\item\em 执行多条SQL语句，实现数据库事务。 \item\end{DoxyCompactList}\item 
static void {\bf ExecuteSqlTranWithIndentity} (System.Collections.Generic.List$<$ {\bf CommandInfo} $>$ SQLStringList)
\begin{DoxyCompactList}\small\item\em 执行多条SQL语句，实现数据库事务。 \item\end{DoxyCompactList}\item 
static void {\bf ExecuteSqlTranWithIndentity} (Hashtable SQLStringList)
\begin{DoxyCompactList}\small\item\em 执行多条SQL语句，实现数据库事务。 \item\end{DoxyCompactList}\item 
static object {\bf GetSingle} (string SQLString, params SqlParameter[$\,$] cmdParms)
\begin{DoxyCompactList}\small\item\em 执行一条计算查询结果语句，返回查询结果（object）。 \item\end{DoxyCompactList}\item 
static SqlDataReader {\bf ExecuteReader} (string SQLString, params SqlParameter[$\,$] cmdParms)
\begin{DoxyCompactList}\small\item\em 执行查询语句，返回SqlDataReader ( 注意：调用该方法后，一定要对SqlDataReader进行Close ) \item\end{DoxyCompactList}\item 
static DataSet {\bf Query} (string SQLString, params SqlParameter[$\,$] cmdParms)
\begin{DoxyCompactList}\small\item\em 执行查询语句，返回DataSet \item\end{DoxyCompactList}\item 
static SqlDataReader {\bf RunProcedure} (string storedProcName, IDataParameter[$\,$] parameters)
\begin{DoxyCompactList}\small\item\em 执行存储过程，返回SqlDataReader ( 注意：调用该方法后，一定要对SqlDataReader进行Close ) \item\end{DoxyCompactList}\item 
static DataSet {\bf RunProcedure} (string storedProcName, IDataParameter[$\,$] parameters, string tableName)
\begin{DoxyCompactList}\small\item\em 执行存储过程 \item\end{DoxyCompactList}\item 
static DataSet {\bfseries RunProcedure} (string storedProcName, IDataParameter[$\,$] parameters, string tableName, int Times)\label{class_d_b_utility_1_1_db_helper_s_q_l_a3e91c887955434baca760c6b42f9a1c5}

\item 
static int {\bf RunProcedure} (string storedProcName, IDataParameter[$\,$] parameters, out int rowsAffected)
\begin{DoxyCompactList}\small\item\em 执行存储过程，返回影响的行数 \item\end{DoxyCompactList}\item 
static DataTable {\bf FindByConditions} (object obj, string conditions)
\begin{DoxyCompactList}\small\item\em 根据条件返回查询到的DataTable \item\end{DoxyCompactList}\item 
static DataTable {\bf FindByPage} (object obj, string start, string limit, string conditions)
\begin{DoxyCompactList}\small\item\em 分页查询，返回当前页的DataTable \item\end{DoxyCompactList}\item 
static string {\bf GetCountByConditions} (object obj, string conditions)
\begin{DoxyCompactList}\small\item\em 返回符合记录的数据条数 \item\end{DoxyCompactList}\item 
static bool {\bf Delete} (object obj)
\begin{DoxyCompactList}\small\item\em 根据表名删除记录 \item\end{DoxyCompactList}\item 
static bool {\bf Delete} (object obj, string conditions)
\begin{DoxyCompactList}\small\item\em 批量删除 \item\end{DoxyCompactList}\item 
static bool {\bf Insert} (object obj)
\begin{DoxyCompactList}\small\item\em 添加一条记录 \item\end{DoxyCompactList}\item 
static bool {\bf Update} (object obj)
\begin{DoxyCompactList}\small\item\em 更新记录 \item\end{DoxyCompactList}\item 
static bool {\bfseries Update} (object obj, string sets, string conditions)\label{class_d_b_utility_1_1_db_helper_s_q_l_a90418d4f5ef4c18cabba70d259bd021b}

\end{DoxyCompactItemize}
\subsection*{静态公有属性}
\begin{DoxyCompactItemize}
\item 
static string {\bfseries connectionString} = PubConstant.ConnectionString\label{class_d_b_utility_1_1_db_helper_s_q_l_ae4c47207754949e6e7d65733142a787f}

\item 
static readonly log4net.ILog {\bfseries log} = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)\label{class_d_b_utility_1_1_db_helper_s_q_l_a58aed0324cb41769f893be6b62bc5722}

\end{DoxyCompactItemize}


\subsection{详细描述}
数据访问抽象基础类 

\subsection{成员函数文档}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ColumnExists@{ColumnExists}}
\index{ColumnExists@{ColumnExists}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ColumnExists}]{\setlength{\rightskip}{0pt plus 5cm}static bool DBUtility.DbHelperSQL.ColumnExists (
\begin{DoxyParamCaption}
\item[{string}]{ tableName, }
\item[{string}]{ columnName}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_ac2f6d3a7fae8fab77ee7a37e2f0cad09}


判断是否存在某表的某个字段 


\begin{DoxyParams}{参数}
{\em tableName} & 表名称\\
\hline
{\em columnName} & 列名称\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
是否存在
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!Delete@{Delete}}
\index{Delete@{Delete}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{Delete}]{\setlength{\rightskip}{0pt plus 5cm}static bool DBUtility.DbHelperSQL.Delete (
\begin{DoxyParamCaption}
\item[{object}]{ obj}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_ade05cbbab48b7d54043d69b24fa37a09}


根据表名删除记录 


\begin{DoxyParams}{参数}
{\em TableName} & 表名\\
\hline
{\em AutoID} & 自动增长id\\
\hline
{\em value} & id值\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
是否删除
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!Delete@{Delete}}
\index{Delete@{Delete}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{Delete}]{\setlength{\rightskip}{0pt plus 5cm}static bool DBUtility.DbHelperSQL.Delete (
\begin{DoxyParamCaption}
\item[{object}]{ obj, }
\item[{string}]{ conditions}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a3abbf2203444a26efaeb9adde81053f0}


批量删除 


\begin{DoxyParams}{参数}
{\em obj} & 对象名\\
\hline
{\em condition} & 条件\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回是否成功
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteReader@{ExecuteReader}}
\index{ExecuteReader@{ExecuteReader}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteReader}]{\setlength{\rightskip}{0pt plus 5cm}static SqlDataReader DBUtility.DbHelperSQL.ExecuteReader (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString, }
\item[{params SqlParameter[$\,$]}]{ cmdParms}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a4b1962364133097a3558e65952a737bf}


执行查询语句，返回SqlDataReader ( 注意：调用该方法后，一定要对SqlDataReader进行Close ) 


\begin{DoxyParams}{参数}
{\em strSQL} & 查询语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
SqlDataReader
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteReader@{ExecuteReader}}
\index{ExecuteReader@{ExecuteReader}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteReader}]{\setlength{\rightskip}{0pt plus 5cm}static SqlDataReader DBUtility.DbHelperSQL.ExecuteReader (
\begin{DoxyParamCaption}
\item[{string}]{ strSQL}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_afc8ac00e8af41e4144c51d150b33afc3}


执行查询语句，返回SqlDataReader ( 注意：调用该方法后，一定要对SqlDataReader进行Close ) 


\begin{DoxyParams}{参数}
{\em strSQL} & 查询语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
SqlDataReader
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSql@{ExecuteSql}}
\index{ExecuteSql@{ExecuteSql}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSql}]{\setlength{\rightskip}{0pt plus 5cm}static int DBUtility.DbHelperSQL.ExecuteSql (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString, }
\item[{params SqlParameter[$\,$]}]{ cmdParms}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a03d88b3e6c0333483834898d92623548}


执行SQL语句，返回影响的记录数 


\begin{DoxyParams}{参数}
{\em SQLString} & SQL语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
影响的记录数
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSql@{ExecuteSql}}
\index{ExecuteSql@{ExecuteSql}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSql}]{\setlength{\rightskip}{0pt plus 5cm}static int DBUtility.DbHelperSQL.ExecuteSql (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString, }
\item[{string}]{ content}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a8e428fd06de1a706c884ea557639c869}


执行带一个存储过程参数的的SQL语句。 


\begin{DoxyParams}{参数}
{\em SQLString} & SQL语句\\
\hline
{\em content} & 参数内容,比如一个字段是格式复杂的文章，有特殊符号，可以通过这个方式添加\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
影响的记录数
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSql@{ExecuteSql}}
\index{ExecuteSql@{ExecuteSql}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSql}]{\setlength{\rightskip}{0pt plus 5cm}static int DBUtility.DbHelperSQL.ExecuteSql (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a982a3e7cba7592837b22d4a7446b5d15}


执行SQL语句，返回影响的记录数 


\begin{DoxyParams}{参数}
{\em SQLString} & SQL语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
影响的记录数
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSqlGet@{ExecuteSqlGet}}
\index{ExecuteSqlGet@{ExecuteSqlGet}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSqlGet}]{\setlength{\rightskip}{0pt plus 5cm}static object DBUtility.DbHelperSQL.ExecuteSqlGet (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString, }
\item[{string}]{ content}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_ac12baa785c55b85dd37e90a51148cf8d}


执行带一个存储过程参数的的SQL语句。 


\begin{DoxyParams}{参数}
{\em SQLString} & SQL语句\\
\hline
{\em content} & 参数内容,比如一个字段是格式复杂的文章，有特殊符号，可以通过这个方式添加\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
影响的记录数
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSqlInsertImg@{ExecuteSqlInsertImg}}
\index{ExecuteSqlInsertImg@{ExecuteSqlInsertImg}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSqlInsertImg}]{\setlength{\rightskip}{0pt plus 5cm}static int DBUtility.DbHelperSQL.ExecuteSqlInsertImg (
\begin{DoxyParamCaption}
\item[{string}]{ strSQL, }
\item[{byte[$\,$]}]{ fs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a1073cd4f929a379fc7d3c0422bd05a0f}


向数据库里插入图像格式的字段(和上面情况类似的另一种实例) 


\begin{DoxyParams}{参数}
{\em strSQL} & SQL语句\\
\hline
{\em fs} & 图像字节,数据库的字段类型为image的情况\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
影响的记录数
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSqlTran@{ExecuteSqlTran}}
\index{ExecuteSqlTran@{ExecuteSqlTran}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSqlTran}]{\setlength{\rightskip}{0pt plus 5cm}static int DBUtility.DbHelperSQL.ExecuteSqlTran (
\begin{DoxyParamCaption}
\item[{List$<$ String $>$}]{ SQLStringList}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a028853cc819f2765653abcc3400d8e99}


执行多条SQL语句，实现数据库事务。 


\begin{DoxyParams}{参数}
{\em SQLStringList} & 多条SQL语句\\
\hline
\end{DoxyParams}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSqlTran@{ExecuteSqlTran}}
\index{ExecuteSqlTran@{ExecuteSqlTran}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSqlTran}]{\setlength{\rightskip}{0pt plus 5cm}static void DBUtility.DbHelperSQL.ExecuteSqlTran (
\begin{DoxyParamCaption}
\item[{Hashtable}]{ SQLStringList}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a88e179c39bf3cee48595d23ffaac3bc1}


执行多条SQL语句，实现数据库事务。 


\begin{DoxyParams}{参数}
{\em SQLStringList} & SQL语句的哈希表（key为sql语句，value是该语句的SqlParameter[]）\\
\hline
\end{DoxyParams}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSqlTran@{ExecuteSqlTran}}
\index{ExecuteSqlTran@{ExecuteSqlTran}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSqlTran}]{\setlength{\rightskip}{0pt plus 5cm}static int DBUtility.DbHelperSQL.ExecuteSqlTran (
\begin{DoxyParamCaption}
\item[{System.Collections.Generic.List$<$ {\bf CommandInfo} $>$}]{ cmdList}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a18a7609eb9a18f225af66e95ef5feabc}


执行多条SQL语句，实现数据库事务。 


\begin{DoxyParams}{参数}
{\em SQLStringList} & SQL语句的哈希表（key为sql语句，value是该语句的SqlParameter[]）\\
\hline
\end{DoxyParams}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSqlTranWithIndentity@{ExecuteSqlTranWithIndentity}}
\index{ExecuteSqlTranWithIndentity@{ExecuteSqlTranWithIndentity}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSqlTranWithIndentity}]{\setlength{\rightskip}{0pt plus 5cm}static void DBUtility.DbHelperSQL.ExecuteSqlTranWithIndentity (
\begin{DoxyParamCaption}
\item[{System.Collections.Generic.List$<$ {\bf CommandInfo} $>$}]{ SQLStringList}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a344aa5e98e849f1b5ee5c50214e9f20d}


执行多条SQL语句，实现数据库事务。 


\begin{DoxyParams}{参数}
{\em SQLStringList} & SQL语句的哈希表（key为sql语句，value是该语句的SqlParameter[]）\\
\hline
\end{DoxyParams}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!ExecuteSqlTranWithIndentity@{ExecuteSqlTranWithIndentity}}
\index{ExecuteSqlTranWithIndentity@{ExecuteSqlTranWithIndentity}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{ExecuteSqlTranWithIndentity}]{\setlength{\rightskip}{0pt plus 5cm}static void DBUtility.DbHelperSQL.ExecuteSqlTranWithIndentity (
\begin{DoxyParamCaption}
\item[{Hashtable}]{ SQLStringList}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a90e5be322268680dffd8900d2917f180}


执行多条SQL语句，实现数据库事务。 


\begin{DoxyParams}{参数}
{\em SQLStringList} & SQL语句的哈希表（key为sql语句，value是该语句的SqlParameter[]）\\
\hline
\end{DoxyParams}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!FindByConditions@{FindByConditions}}
\index{FindByConditions@{FindByConditions}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{FindByConditions}]{\setlength{\rightskip}{0pt plus 5cm}static DataTable DBUtility.DbHelperSQL.FindByConditions (
\begin{DoxyParamCaption}
\item[{object}]{ obj, }
\item[{string}]{ conditions}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_aaf0d2a57531d9f853319b21b3dca85d0}


根据条件返回查询到的DataTable 


\begin{DoxyParams}{参数}
{\em TableName} & 表名\\
\hline
{\em conditions} & 条件\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!FindByPage@{FindByPage}}
\index{FindByPage@{FindByPage}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{FindByPage}]{\setlength{\rightskip}{0pt plus 5cm}static DataTable DBUtility.DbHelperSQL.FindByPage (
\begin{DoxyParamCaption}
\item[{object}]{ obj, }
\item[{string}]{ start, }
\item[{string}]{ limit, }
\item[{string}]{ conditions}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a16212686ded6e6cce6b4c220caed9037}


分页查询，返回当前页的DataTable 


\begin{DoxyParams}{参数}
{\em TableName} & 表名\\
\hline
{\em AutoID} & 自动增长列\\
\hline
{\em start} & 起始记录号\\
\hline
{\em limit} & 分页大小\\
\hline
{\em conditions} & 附加条件\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!GetCountByConditions@{GetCountByConditions}}
\index{GetCountByConditions@{GetCountByConditions}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{GetCountByConditions}]{\setlength{\rightskip}{0pt plus 5cm}static string DBUtility.DbHelperSQL.GetCountByConditions (
\begin{DoxyParamCaption}
\item[{object}]{ obj, }
\item[{string}]{ conditions}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a1aada4d7d68dc9775226ba9a6c999187}


返回符合记录的数据条数 


\begin{DoxyParams}{参数}
{\em TableName} & 表名\\
\hline
{\em conditions} & 条件\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!GetSingle@{GetSingle}}
\index{GetSingle@{GetSingle}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{GetSingle}]{\setlength{\rightskip}{0pt plus 5cm}static object DBUtility.DbHelperSQL.GetSingle (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString, }
\item[{params SqlParameter[$\,$]}]{ cmdParms}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_ad80cf8b5b1447c7a5721ee41b05f8b60}


执行一条计算查询结果语句，返回查询结果（object）。 


\begin{DoxyParams}{参数}
{\em SQLString} & 计算查询结果语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
查询结果（object）
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!GetSingle@{GetSingle}}
\index{GetSingle@{GetSingle}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{GetSingle}]{\setlength{\rightskip}{0pt plus 5cm}static object DBUtility.DbHelperSQL.GetSingle (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a637b01d526fa0a85208b901b3af91205}


执行一条计算查询结果语句，返回查询结果（object）。 


\begin{DoxyParams}{参数}
{\em SQLString} & 计算查询结果语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
查询结果（object）
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!Insert@{Insert}}
\index{Insert@{Insert}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{Insert}]{\setlength{\rightskip}{0pt plus 5cm}static bool DBUtility.DbHelperSQL.Insert (
\begin{DoxyParamCaption}
\item[{object}]{ obj}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a42745bc7ee24e4860bc6ff6e97a7bb41}


添加一条记录 


\begin{DoxyParams}{参数}
{\em obj} & 表名称对象\\
\hline
{\em AutoID} & 自增列\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
是否插入成功
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!Query@{Query}}
\index{Query@{Query}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{Query}]{\setlength{\rightskip}{0pt plus 5cm}static DataSet DBUtility.DbHelperSQL.Query (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString, }
\item[{params SqlParameter[$\,$]}]{ cmdParms}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a072e5290ef90784308edca673cfff577}


执行查询语句，返回DataSet 


\begin{DoxyParams}{参数}
{\em SQLString} & 查询语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
DataSet
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!Query@{Query}}
\index{Query@{Query}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{Query}]{\setlength{\rightskip}{0pt plus 5cm}static DataSet DBUtility.DbHelperSQL.Query (
\begin{DoxyParamCaption}
\item[{string}]{ SQLString}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a6779ec56f3bcb3cbbeaf871db83a497c}


执行查询语句，返回DataSet 


\begin{DoxyParams}{参数}
{\em SQLString} & 查询语句\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
DataSet
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!RunProcedure@{RunProcedure}}
\index{RunProcedure@{RunProcedure}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{RunProcedure}]{\setlength{\rightskip}{0pt plus 5cm}static SqlDataReader DBUtility.DbHelperSQL.RunProcedure (
\begin{DoxyParamCaption}
\item[{string}]{ storedProcName, }
\item[{IDataParameter[$\,$]}]{ parameters}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_ab03de63b1aef3355b2a22e8d3ab00d39}


执行存储过程，返回SqlDataReader ( 注意：调用该方法后，一定要对SqlDataReader进行Close ) 


\begin{DoxyParams}{参数}
{\em storedProcName} & 存储过程名\\
\hline
{\em parameters} & 存储过程参数\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
SqlDataReader
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!RunProcedure@{RunProcedure}}
\index{RunProcedure@{RunProcedure}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{RunProcedure}]{\setlength{\rightskip}{0pt plus 5cm}static int DBUtility.DbHelperSQL.RunProcedure (
\begin{DoxyParamCaption}
\item[{string}]{ storedProcName, }
\item[{IDataParameter[$\,$]}]{ parameters, }
\item[{out int}]{ rowsAffected}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a8c3743a7db235ae95e38c5ab073ae64b}


执行存储过程，返回影响的行数 


\begin{DoxyParams}{参数}
{\em storedProcName} & 存储过程名\\
\hline
{\em parameters} & 存储过程参数\\
\hline
{\em rowsAffected} & 影响的行数\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!RunProcedure@{RunProcedure}}
\index{RunProcedure@{RunProcedure}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{RunProcedure}]{\setlength{\rightskip}{0pt plus 5cm}static DataSet DBUtility.DbHelperSQL.RunProcedure (
\begin{DoxyParamCaption}
\item[{string}]{ storedProcName, }
\item[{IDataParameter[$\,$]}]{ parameters, }
\item[{string}]{ tableName}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a93b74ee65bd8f3d98f61b7eadb366abf}


执行存储过程 


\begin{DoxyParams}{参数}
{\em storedProcName} & 存储过程名\\
\hline
{\em parameters} & 存储过程参数\\
\hline
{\em tableName} & DataSet结果中的表名\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
DataSet
\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!TabExists@{TabExists}}
\index{TabExists@{TabExists}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{TabExists}]{\setlength{\rightskip}{0pt plus 5cm}static bool DBUtility.DbHelperSQL.TabExists (
\begin{DoxyParamCaption}
\item[{string}]{ TableName}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a205c18cb5748bcdea2bc399b6acfe2c8}


表是否存在 


\begin{DoxyParams}{参数}
{\em TableName} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\index{DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}!Update@{Update}}
\index{Update@{Update}!DBUtility::DbHelperSQL@{DBUtility::DbHelperSQL}}
\subsubsection[{Update}]{\setlength{\rightskip}{0pt plus 5cm}static bool DBUtility.DbHelperSQL.Update (
\begin{DoxyParamCaption}
\item[{object}]{ obj}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{class_d_b_utility_1_1_db_helper_s_q_l_a18f6b210145985e7a52101b7f814cabc}


更新记录 


\begin{DoxyParams}{参数}
{\em obj} & 表实体\\
\hline
{\em AutoID} & 自动id\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
是否更新成功
\end{DoxyReturn}


该类的文档由以下文件生成：\begin{DoxyCompactItemize}
\item 
D:/Project/1101/DBUtility/DbHelperSQL.cs\end{DoxyCompactItemize}
